package cn.dakaqi.user.service;

import cn.dakaqi.entities.User;
import cn.dakaqi.entities.UserOpenId;
import cn.dakaqi.entities.Volunteer;
import cn.dakaqi.utils.exception.ServiceRuntimeException;

import java.util.List;

/**
 * Created by chunyang on 2016/4/7.
 */
public interface UserService {
    public User findOne(Long userId) throws ServiceRuntimeException;

    public List<User> getAllUser() throws ServiceRuntimeException;

    public User findByMobile(String mobile) throws ServiceRuntimeException;

    public User findByEmail(String email) throws ServiceRuntimeException;

    public User login(String mobile, String password) throws ServiceRuntimeException;
    public User login(String mobile, String password,String area,double lng,double lat) throws ServiceRuntimeException;

    public void saveThirdPartyUser(User user,Volunteer volunteer) throws ServiceRuntimeException;

    public void saveUser(User user) throws ServiceRuntimeException;

    public void bundMobile(String json) throws ServiceRuntimeException;

    public void saveUser(String json) throws ServiceRuntimeException;

    public User saveSimpleUser(User user) throws ServiceRuntimeException;

    public void saveUser(User user, String verififerCode) throws ServiceRuntimeException;

    public void updatePassd(String param) throws ServiceRuntimeException;

    public void updatePsswd(Long id, String oldPasswd, String newPasswd) throws ServiceRuntimeException;

    public void updateUser(String json) throws ServiceRuntimeException;

    public void updateUser(User user) throws ServiceRuntimeException;

    public void deleteUser(Long id) throws ServiceRuntimeException;

    public void lockUser(Long id, int lockedStatus) throws ServiceRuntimeException;

    public void setNewPasswd(String mobile, String passwod) throws ServiceRuntimeException;

    public void setNewPasswd(String param) throws ServiceRuntimeException;

    public String sendVerifierCode(String mobile) throws ServiceRuntimeException;

    public void updateMobile(String param) throws ServiceRuntimeException;

    public void updateMobile(String oldMobile, String newMobile) throws ServiceRuntimeException;
    public void updateMobile(String oldMobile, String newMobile,String code) throws ServiceRuntimeException;

    public void updateMobile(String oldMobile, String password, String newMobile, String code) throws ServiceRuntimeException;

    public void regUser(Volunteer volunteer, String groupCode) throws ServiceRuntimeException;

    User tencent(String param) throws ServiceRuntimeException;

    User sina(String param) throws ServiceRuntimeException;

    User wechat(String param) throws ServiceRuntimeException;

    User signIn(String param) throws ServiceRuntimeException;

    UserOpenId save(UserOpenId userOpenId) throws ServiceRuntimeException;

    UserOpenId findOpenId(String memberCode,int type) throws ServiceRuntimeException;


}